import request from '../libs/request';

/**
 * 获取设备列表
 * @param params
 */
export function findDeviceList (params) {
    return request({
        url: 'api/device/findDeviceList',
        method: 'post',
        data: params
    });
}

/**
 * 新增被管设备
 * @param params
 */
export function addSaveDevice(params) {
    return request({
        url: 'api/device/addDevice',
        method: 'post',
        data: params
    });
}

/**
 * 修改被管设备
 * @param params
 */
export function updateDevice(params) {
    return request({
        url: 'api/device/updateDevice',
        method: 'post',
        data: params
    });
}

/**
 * 恢复被管设备
 * @param params
 */
export function recoverDevice(params) {
    return request({
        url: 'api/device/recoverDevice',
        method: 'post',
        data: params
    });
}

/**
 * 注册被管设备
 * @param params
 */
export function registerDevice(params) {
    return request({
        url: 'api/device/registerDevice',
        method: 'post',
        data: params
    })
}

/**
 * 注销被管设备
 * @param params
 */
export function logoutDevice(params) {
    return request({
        url: 'api/device/logoutDevice',
        method: 'post',
        data: params
    })
}

/**
 * 激活被管设备
 * @param params
 */
export function activateDevice(params) {
    return request({
        url: 'api/device/activateDevice',
        method: 'post',
        data: params
    })
}

/**
 * 获取设备详情
 * @param params
 */
export function findDeviceDetailById(params) {
    return request({
        url: 'api/device/findDeviceDetailById',
        method: 'get',
        params
    })
}

/**
 * 删除被管设备
 * @param params
 */
export function deleteDevice(params) {
    return request({
        url: 'api/device/deleteDevice',
        method: 'post',
        data: params
    })
}

/**
 * 获取文件列表
 * @param params
 */
export function getFolderTreeList(params) {
    return request({
        url: 'api/device/getFolderTreeList',
        method: 'post',
        data: params
    })
}

/**
 * 生成公钥
 * @param params
 */
export function getPublicKey(params) {
    return request({
        url: 'api/device/getPublicKey',
        method: 'post',
        data: params
    })
}

/**
 * 获取注册成功结果
 * @param params
 */
export function getDeviceRegisterDTO(params) {
    return request({
        url: 'api/device/getDeviceRegisterDTO',
        method: 'post',
        data: params
    })
}